package com.bbs.dto;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class PostAdd {

    @NotBlank(message = "标题不能为空")
    @Size(min = 0, max = 20)
    @NotNull(message = "标题不能为空")
    private String title;

    @NotNull(message = "请选择板块")
    @NotBlank(message = "请选择板块")
    private String categoryId;

    @NotNull(message = "内容不能为空")
    @NotBlank(message = "内容不能为空")
    @Size(max = 10000)
    private String content;
}
